using System;
using EnvDTE;
using Microsoft.Practices.RecipeFramework;

namespace PrismFactory.SoftwareFactory.Extensions.Actions.VisualStudio
{
    public class GetProjectGuidAction : ConfigurableAction
    {
        [Input]
        public Project Project { get; set; }

        [Output]
        public Guid Guid { get; set; }

        public override void Execute()
        {
            Guid = Utility.GetProjectGuid(GetService<IServiceProvider>(), Project);
        }

        public override void Undo()
        {
            throw new Exception("The method or operation is not implemented.");
        }
    }
}